#pragma once

#include <common/Device.h>

namespace flashpp {

class Network {
 public:
  Network() {}
  Network(std::string name) : name_(name) {}

  void
  setName(std::string name) {
    name_ = name;
  }
  
  std::string
  name() {
    return name_;
  }

  Device& addDevice(std::string name);
  void addLink(
      std::string dev1, std::string port1, std::string dev2, std::string port2);

  std::map<std::string, Device>&
  nameToDevice() {
    return nameToDevice_;
  }
  Device&
  nameToDevice(std::string name) {
    return nameToDevice_.at(name);
  }

 private:
  std::string name_;
  std::map<std::string, Device> nameToDevice_;
};

} // namespace flashpp